package com.sychip.fhc.app.data.repo

import com.sychip.fhc.app.data.source.dto.BleDeviceDto
import kotlinx.coroutines.flow.Flow

interface BleDeviceRepo {
    fun getAllBleDevices(): Flow<List<BleDeviceDto>>

    fun getBleDevicesStream(): Flow<List<BleDeviceDto>>

    suspend fun getBleDevices(forceUpdate: Boolean = false): List<BleDeviceDto>

    suspend fun refresh()

    fun getBleDeviceStream(devId: String): Flow<BleDeviceDto?>

    suspend fun getBleDevice(devId: String, forceUpdate: Boolean = false): BleDeviceDto?

    suspend fun refreshBleDevice(devId: String)

    fun createBleDevice(name: String, mac: String): Flow<BleDeviceDto>

    suspend fun updateBleDevice(devId: String, name: String, mac: String, lastConnected: String)

    suspend fun updateLastConnected(devId: String)


    suspend fun clearCompletedBleDevices()

    suspend fun deleteAllBleDevices()

    suspend fun deleteBleDevice(devId: String):Int
}